package com.example.demo.core;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class BookBackInfo {
    String needPay;
    String overdue;
    Date timeBorrow;
    Date timeNeedBack;


    public static void main(String[] args) {
        String string="2021-08-26 00:00:00";

        Date date= null;
        try {
            date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(string);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        System.out.println(date);
        DecimalFormat df2 =new DecimalFormat("#");
        System.out.println(df2.format(1.1));
    }
}
